#include <iostream>
using namespace std;


class A{
    public:
        int a;
};
class B:public A{
    public:
        int b;
};
class C:public A {
    public:
        int c;
};
class D:public B, public C {
    public: 
        void function(void) {
            // a = 200;  error because of ambiguity
            // 解决方法： 通过类名明确指定访问的是哪一个成员
            B::a = 200;
        }
};

int main(int argc, char const *argv[])
{
    /* code */
    D obj;
    // obj.a = 100;
    obj.C::a = 100;
    return 0;
}
